#  -*- coding:utf-8 -*- 
"""
@ author: 罗金盛
@ time: 2024/3/6 
@ file: 4.异常处理.py

"""
def add(a,b):
    try:
        c = a + b
        1/0
        print('a+b=',c)
        return c
    except TypeError as e:
        print('发生错误了！',e)
    except ZeroDivisionError as e:
        print('发生错误了！',e)
    finally:
        print("无论是否出错，finally一定会被执行！")
add('5',3)










